﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;

namespace pbvs.Models
{
    public class ValuationRequest
    {
        #region Properties

        [Key]
        public int Id { get; set; }
        public int ClientId { get; set; }
        public DateTime CreatedDt { get; set; }
        [DisplayName("Case Identifier")]
        public string CaseId { get; set; }
        [DisplayName("Plan name")]
        public string PlanName { get; set; }
        [DisplayName("Participant First Name (real name or alias)")]
        public string ParticipantFirstName { get; set; }
        [DisplayName("Participant Last Name (real name or alias)")]
        public string ParticipantLastName { get; set; }
        [DisplayName("Gender")]
        public string Gender { get; set; }
        [DisplayName("Participant's date of birth")]
        public DateTime Dob { get; set; }
        [DisplayName("Participant's date of hire")]
        public DateTime Doh { get; set; }
        [DisplayName("Participant's date of termination")]
        public DateTime Dot { get; set; }
        [DisplayName("Participants retirement date")]
        public DateTime RetirementDate { get; set; }
        [DisplayName("Monthly benefit payable at retirement date")]
        public decimal BenefitAtRetirement { get; set; }
        [DisplayName("Date through which benefit was earned")]
        public DateTime EarnedDate { get; set; }
        [DisplayName("If monthly benefit is other than a life only annuity, please indicate type of annuity")]
        public string AnnuityType { get; set; }
        [DisplayName("Date as of which benefit is to be valued")]
        public DateTime ValuationDate { get; set; }
        [DisplayName("Do you want to specify the discount rate(interest rate) assumption to be used")]
        public bool OverrideInterest { get; set; }
	    [DisplayName("Specified Interest Rate")]
	    public decimal InterestRate { get; set; }
        [DisplayName("Is the monthly benefit subject to an annual cost-of-living increase")]
        public decimal InterestRateThereafter { get; set; }
        public bool SubjectToCola { get; set; }
	    [DisplayName("If yes, enter assumed cola (e.g., 2%) or \"?\" if you want to use our database of historical cola's for the Plan")]
	    public decimal Cola { get; set; }
	    public bool CalculateMarriage { get; set; }
        [DisplayName("Do you want to use the Fractional Rule")]
        public bool UseFractional { get; set; }
        [DisplayName("If no, specify the marital portion")]
        public decimal MaritalPortion { get; set; }
        [DisplayName("Date of Marriage")]
        public DateTime MarriageDate { get; set; }
        [DisplayName("Start date for earning of benefit")]
        public DateTime EarningStartDate { get; set; }
        [DisplayName("End date for earning of benefit while married")]
        public DateTime MarriageEarningEndDate { get; set; }
        [DisplayName("Is there a survivorship benefit to be valued")]
        public bool Survivorship { get; set; }
        [DisplayName("Survivor First Name(real or alias)")]
        public string SurvivorFirstName { get; set; }
        [DisplayName("Survivor's Gender")]
        public string SurvivorGender { get; set; }
        [DisplayName("Survivor Last Name(real or alias)")]
        public string SurvivorLastName { get; set; }
        [DisplayName("Survivor's Date of Birth")]
        public DateTime SurvivorDob { get; set; }
	    [DisplayName("Survivorship Percentage")]
	    public decimal SurvivorshipPercentage { get; set; }

        [ForeignKey("ClientId")]
        public virtual Client Client { get; set; }

        #endregion
        #region Constructors

        public ValuationRequest() 
        {
            this.CreatedDt = DateTime.Now;
        }

        #endregion
    }
}